#!/bin/sh
#
#    Copyright (c) 2003 Brocade Communications Systems, Inc.
#    All rights reserved.
#
#    File name:	prominst_ulysses
#
#    The script will install prom package for Ulysses
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin

echo "Please avoid powering off the system during prom update."
OK=0
for i in `seq 3`; do
        nohup /sbin/flash_write -i /boot/bootrom.bin -o /dev/prom -s 320k >/dev/null 2>&1
        if [ $? -eq 0 ]; then
                OK=1
                break;
        fi
done
if [ $OK = 0 ]; then
        echo "Failed to write to prom partition!"
        exit 1
fi
